home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.whtech.com
/
ftp.whtech.com.tar
/
ftp.whtech.com
/
video
/
Chicago TI Fair 2014 Videos
/
Chicago TI Faire Disk 2014
/
RENAMING_FILES_IN_LINUX.TXT
< prev
Wrap
Text File
|
2014-11-26
|
2KB
|
48 lines
How to batch file rename TI .dsk files: "filename.dsk"
that were converted to HxC .hfe files
and now have the following format: "filename"_dsk.hfe
want to change to: "filename".hfe
so that the total filename is shorter and easier to read on the HxC display,
which scrolls and is illegible with names over 15 total characters. They will
run otherwise, just hard to read!
UNIX COMMAND:
rename -v 's/\_dsk\.hfe/\.hfe/' *hfe
EXPLANATION:
rename = rename files
rename -v 's/\_dsk\.hfe/\.hfe/' *hfe
-v = verbose display the files worked on
rename -v 's/\_dsk\.hfe/\.hfe/' *hfe
's/ = 'switch/old/new/' command beginning
rename -v 's/\_dsk\.hfe/\.hfe/' *hfe
\ = treat following underline character as what it is, not a command shortcut
rename -v 's/\_dsk\.hfe/\.hfe/' *hfe
_dsk = unwanted characters in filename
rename -v 's/\_dsk\.hfe/\.hfe/' *hfe
\ = treat following dot character as what it is, not a command shortcut
rename -v 's/\_dsk\.hfe/\.hfe/' *hfe
.hfe current extension
rename -v 's/\_dsk\.hfe/\.hfe/' *hfe
/ = end of old command
rename -v 's/\_dsk\.hfe/\.hfe/' *hfe
\ = treat following dot character as what it is, not a command shortcut
rename -v 's/\_dsk\.hfe/\.hfe/' *hfe
.hfe = new extension
rename -v 's/\_dsk\.hfe/\.hfe/' *hfe
/' = switch /old/new/ command closing characters
rename -v 's/\_dsk\.hfe/\.hfe/' *hfe
(space)*hfe = only work on all files with this extension
Batch files like this saved me a TON of typing when renaming the files on this disk!